#include "VideoWidget.h"

VideoWidget::VideoWidget(QWidget *parent) : QWidget(parent)
{
}

void VideoWidget::mouseReleaseEvent(QMouseEvent *event){
    if(event->button() == Qt::LeftButton){
        QTime newTime(QTime::currentTime());
        int nSecBetweenTwoClicks = 1;
        if(this->lastTimeLeftClicked.secsTo(newTime) < nSecBetweenTwoClicks){
            emit doubleClicked();
        }else{
            this->lastTimeLeftClicked = newTime;
        }
    }
}


